#include<stdio.h>

int main()
{
	int a;
	double m;
	scanf("%d",&a);
	if (a<=150)
	{
		m=a*0.4463;
	}
	else if (a<=400)
		{
			m=(a-150)*0.4663+150*0.4463;
		}
		else m=(a-400)*0.5663+150*0.4463+250*0.4663;
	printf("%.1lf",m);
	return 0;
}
	
